home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / magicwb / update drawers < prev    next >
Text File  |  1980-06-28  |  5KB  |  158 lines

  1. failat 21
  2.  
  3. if not exists XEN-Icons
  4.   echo "*n Please change current directory to that of MagicWB *n or start the installation from the Workbench!*n"
  5.   quit
  6. endif
  7.  
  8. assign Magic: ""
  9.  
  10. echo "*n*e[1;32m ____________________________________________________________________"
  11. echo " *e[43m                                                                    *e[0m"
  12. echo " *e[0;32;43m              Welcome to MagicWB v1.2p: UPDATE DRAWERS*e[1m              *e[0m"
  13. echo " *e[1;4;43m                                                                    *e[0m"
  14. echo "*n*n This small installation was written to provide you with the most"
  15. echo " comfortable way of replacing the old Drawer-Icons with the new ones"
  16. echo " from *e[32mMagicWB*e[0m."
  17. echo " *n This installation should be started AFTER the main installation"
  18. echo " was done IF you still find any old drawers on your Workbench! As"
  19. echo " the main installation only updates the drawers in your SYS-Directory"
  20. echo " there might be the possibility that you still do have old drawers"
  21. echo " in other directories."
  22. echo " *n If you have found old drawers on your Workbench, please remember"
  23. echo " the PATH where they are located to provide this installation with" 
  24. echo " the exact path so that it can update these drawers."
  25. echo " *n Comment: This installation WILL PRESERVE the original positions"
  26. echo " of your old drawers. Only the old Drawer-Images will be changed."
  27. echo " So, don't be afraid. You will NOT lose your old drawer snapshots. ;)"
  28. echo noline "*n Start the Drawer-Update? "
  29.  
  30. set > nil: InpVar ?
  31.  
  32. if $InpVar eq "ja"
  33.   skip Start
  34. endif
  35.  
  36. if $InpVar eq "j"
  37.   skip Start
  38. endif
  39.  
  40. if $InpVar eq "y"
  41.   skip Start
  42. endif
  43.  
  44. if $InpVar eq "yes"
  45.   skip Start
  46. endif
  47.  
  48. echo noline "*n*e[32m Update aborted."
  49. quit
  50.  
  51. lab Start
  52. resident IU update/IconUpdate pure
  53. echo "*e[1;1H*e[J"
  54. echo "*n Information: You can always abort this installation by pressing"
  55. echo " CTRL-D (and, if needed, followed by pressing RETURN).*n"
  56. echo "*n You can decide now if you want to update the drawers ONLY"
  57. echo " IN THE DIRECTORY of the given path (= Normal mode) or INCLUDING"
  58. echo " ALL SUB-DIRECTORIES of the given path (= Recursive mode).*n"
  59. echo " If you want to do it in the normal mode enter N."
  60. echo " If you want to do it recursively enter R."
  61. echo noline "*n Which mode do you prefer? *e[32m"
  62. set Mode [Return]
  63. set > NIL: Mode ?
  64. if $Mode eq "N"
  65.   skip PathN
  66. endif
  67. if $Mode eq "R"
  68.   skip PathR
  69. endif
  70. echo "*n You have not selected the correct mode! Please try again..."
  71. wait 4
  72. skip back Start
  73.  
  74. lab PathN
  75. echo noline "*e[0m*n*N Please enter the PATH where old Drawer-Icons are located: *e[32m"
  76. set > NIL: Path ?
  77. echo noline "*e[0m"
  78.   if > NIL: not exists $Path
  79.     echo " Wrong path, `$path' does not exist! Try again...*n"
  80.     skip back PathN
  81.   endif
  82. echo noline "*n Updating Drawer-Icons in $Path ..."
  83. list > ram:MWB $Path dirs lformat "if exists *"%s%s.info*" *nIU > NIL: cw XEN-Icons/Prefs/Env-Archive/Sys/def_Drawer.info *"%s%s.info*" *nendif*n"
  84. execute > NIL: ram:MWB
  85. if warn
  86.   echo " Update has failed!!!"
  87.   skip end
  88. endif
  89. echo "....*e[33mDONE*e[0m"
  90. echo "*n*n*e[32m Drawer-Update successfully finished!*e[0m"
  91. skip prefs
  92.  
  93. lab PathR
  94. echo noline "*e[0m*n*N Please enter the PATH where old Drawer-Icons are located: *e[32m"
  95. set > NIL: Path ?
  96. echo noline "*e[0m"
  97.   if > NIL: not exists $Path
  98.     echo " Wrong path, `$path' does not exist! Try again...*n"
  99.     skip back PathR
  100.   endif
  101. echo noline "*n Recursively updating Drawer-Icons in $Path ..."
  102. list > ram:MWB $Path dirs all lformat "if exists *"%s%s.info*" *nIU > NIL: cw XEN-Icons/Prefs/Env-Archive/Sys/def_Drawer.info *"%s%s.info*" *nendif*n"
  103. execute > NIL: ram:MWB
  104. if warn
  105.   echo " Update has failed!!!"
  106.   skip end
  107. endif
  108. echo "....*e[33mDONE*e[0m"
  109. echo "*n*n*e[32m Drawer-Update successfully finished!*e[0m"
  110.  
  111. lab prefs
  112. cd $Path
  113. list > RAM:MWB Prefs.info lformat "%L"
  114. search >NIL: RAM:MWB 2273
  115. if not warn
  116.   wait 3
  117.   echo "*e[1;1H*e[J"
  118.   echo "*n*n Unfortunately you updated the drawers in your SYS: directory!"
  119.   echo " As I told you at the beginning, this had already been done by the"
  120.   echo " main installation. Because you did this for a second time now,"
  121.   echo " the previously installed Prefs-Icon has been overwritten and been"
  122.   echo " replaced by a boring Drawer-Icon. But don't worry:*n"
  123.   echo " You can now decide (again) which type of Prefs-Icon you want to be"
  124.   echo " installed to your SYS: directory. Please type either *"SMALL*" or"
  125.   echo " *"BIG*" in the following request..."
  126.   lab Retry
  127.   echo noline "*e[0m*n Which type of Prefs-Icon should be installed? *e[32m"
  128.   set > NIL: Prefs ?
  129.   if $Prefs eq "SMALL"
  130.     Echo noline "*e[0m Installing SMALL Prefs-Icon..."
  131.     IU > NIL: cw Magic:XEN-Icons/SPECIAL/Prefs.info Prefs.info
  132.     echo "..*e[33mDONE*e[0m"
  133.   else
  134.     if $Prefs eq "BIG"
  135.       Echo noline "*e[0m Installing BIG Prefs-Icon..."
  136.       IU > NIL: cw Magic:XEN-Icons/SPECIAL/Prefs2.info Prefs.info
  137.       echo "..*e[33mDONE*e[0m"
  138.       skip OK
  139.     endif
  140.   echo " You MUST enter either *"SMALL*" or *"BIG*"! Try again..."
  141.   skip back Retry
  142.   endif
  143.   lab OK
  144. endif
  145.  
  146. if exists Trashcan.info
  147.   IU > NIL: cw Magic:XEN-Icons/Prefs/Env-Archive/Sys/def_trashcan.info Trashcan.info
  148. endif
  149.  
  150. echo "*n*n*e[32m Everything is OK now. Bye!"
  151.  
  152. lab end
  153. resident IU remove
  154. delete > NIL: ram:MWB
  155. assign Magic: remove
  156. wait 4
  157. quit
  158.